const assert = require('assert');
const { redirectLogic } = require('../src/background');

// Mock data for testing
const testCases = [
    { url: 'http://example.com', expected: 'http://redirected.com' },
    { url: 'http://test.com', expected: 'http://redirected-test.com' },
];

describe('Redirection Logic', () => {
    testCases.forEach((testCase) => {
        it(`should redirect ${testCase.url} to ${testCase.expected}`, () => {
            const result = redirectLogic(testCase.url);
            assert.strictEqual(result, testCase.expected);
        });
    });
});
